<?php
    
    class MArticle {
        
        private $data;
        private $render = false;
        private $source = false;
        private $files = false;
        
        public function __construct($template){
            
            $file = WEB_PATH . '/views/' . $template . '.php';
            
            if(file_exists($file)){
                $this->render = $file;
            }
            
        }
        
        public function setData($data){ $this->data = $data; } 
        
        public function setSource($type){
            $this->source = $type;
            $this->files = $files;
        }
        
        public function output($direct = true){
            if($direct !== true){
                ob_start();
            }
            
            $data = $this->data;
            
            if($this->source != false){
                
            }
            
            include($this->render);
            
            if($direct !== true){
                ob_clean();
            }
        }
        
    }
    
?>